from selenium import webdriver
from selenium.webdriver.common.by import By
import time

driver = webdriver.Chrome()
driver.get('https://www.baidu.com')

ipt = driver.find_element(By.XPATH,"//form/span/input")
print(ipt.get_attribute('outerHTML'))

ipt1 = driver.find_element(By.XPATH,"//form/span")
print(ipt1.get_attribute('outerHTML'))

time.sleep(2)
driver.quit()
